package com.gitee.ricesugar.mapper;

import com.gitee.ricesugar.controller.request.BaseRequest;
import com.gitee.ricesugar.controller.request.LoginRequest;
import com.gitee.ricesugar.entity.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserMapper {

    void add(User obj);

    List<User> listByCondition(BaseRequest baseRequest);

    User getByUid(String id);

    void updateByUid(User user);

    void deleteByUid(String id);

    User getByUsernameAndPassword(LoginRequest request);

    List<User> listByUsername(String username);
}